import http from '/@/utils/request'



/**
 * 查询部门列表
 */
export const listDept = (query) => {
    return http.request({
        url: '/system/dept/list',
        method:'get',
        params:query
    })
}

export const selectListDept = (query) => {
    return http.request({
        url: '/system/dept/select.list',
        method:'get',
        params:query
    })
}
/**
 * 查询部门详细
 */
export const getDept = (deptId) => {
    return http.request({
        url: '/system/dept/' + deptId,
        method:'get'
    })
}

/**
 * 新增部门
 */
export const addDept = (data) => {
    return http.request({
        url: '/system/dept/add',
        method: 'put',
        data
    })
}

/**
 * 修改部门
 */
export const updateDept = (data) => {
    return http.request({
        url: '/system/dept/update',
        method: 'put',
        data
    })
}

/**
 * 删除部门
 */
export const delDept = (data) => {
    return http.request({
        url: '/system/dept/delete',
        method: 'delete',
        data
    })
}
